package com.rjj.wlqq.wxpay.wxpay.entity;

import com.rjj.wlqq.wx.tool.StrKit;

/**
 * @author r
 * @date 2021/1/20 18:33
 * https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_5
 *
 * <xml>
 * <appid>wx2421b1c4370ec43b</appid>
 * <mch_id>10000100</mch_id>
 * <nonce_str>0b9f35f484df17a732e537c37708d1d0</nonce_str>
 * <out_refund_no></out_refund_no>
 * <out_trade_no>1415757673</out_trade_no>
 * <refund_id></refund_id>
 * <transaction_id></transaction_id>
 * <sign>66FFB727015F450D167EF38CCC549521</sign>
 * </xml>
 */
public class RefundOrderQuery
{
    private String refund_id;

    RefundOrderQuery(String refund_id)
    {
        this.refund_id = refund_id;
    }

    public static RefundOrderQueryBuilder builder()
    {
        return new RefundOrderQueryBuilder();
    }

    public String getRefund_id()
    {
        return this.refund_id;
    }

    public void setRefund_id(String refund_id)
    {
        this.refund_id = refund_id;
    }


    @Override
    public String toString()
    {
        return "RefundOrderQuery(refund_id=" + this.getRefund_id() + ")";
    }

    public static class RefundOrderQueryBuilder
    {
        private String refund_id;

        RefundOrderQueryBuilder()
        {
        }

        public RefundOrderQueryBuilder refund_id(String refund_id)
        {
            this.refund_id = refund_id;
            return this;
        }

        public RefundOrderQuery build()
        {
            return new RefundOrderQuery(refund_id);
        }

        @Override
        public String toString()
        {
            if (StrKit.isBlank(this.refund_id))
            {
                throw new IllegalArgumentException("refund_id is null");
            }
            return "RefundOrderQuery.RefundOrderQueryBuilder(refund_id=" + this.refund_id + ")";
        }
    }
}
